

<div style="float:left; padding:5px;" class="content_right_group_admin box_shadow">

<?php

	if(!isset($_REQUEST['malt'])):

		header("location:trangchu.php");

	else:

		include_once("../../coms/xl_loaitrang.php");

		include_once("../../coms/xl_trang.php");

		include_once("../../coms/xl_tintuc.php");

		$MaLoaiTrang = $_REQUEST['malt'];
	

		//Neu ma loai trang la dich vu

		if($MaLoaiTrang == 5)

		{

			if(isset($_REQUEST['id']) && isset($_REQUEST['madm'])):

				$madm = $_REQUEST['madm'];

				$id = $_REQUEST['id'];

				$dv = new xl_trang();

				$arr_dv = $dv->Load_DichVu_Theo_MaDichVu_MaTrang($madm, $id);

			

				echo '<span style="text-transform:uppercase; color:#FF3300; font-weight:bold;" class="tieu_de_chi_tiet_tin_tuc">

                    	'.$arr_dv['tentrang'].'

                    </span><br/>';

				echo '<div class="noi_dung_rut_gon_chi_tiet_tin_tuc">'.$arr_dv['noidungthugon'].'</div>';
				echo '<div class="noi_dung_day_du_chi_tiet_tin_tuc">'.$arr_dv['noidung'].'</div>';
				//echo $arr_dv['noidung'];

			else:

				header("location:trangchu.php");				

			endif;

		}

			

		else if ($MaLoaiTrang == 7)

		{

			if(isset($_REQUEST['id'])):

				$id = $_REQUEST['id'];

				$dv = new xl_tintuc();

				$arr_dv = $dv->Load_TinTucTheoMa($id);

				?>
				<div class="tieu_de_chi_tiet_tin_tuc">
                    <?php echo $arr_dv['tieude']; ?>
              </div>
                    <div style="margin-top:-10px">
                        <?php 
                            $ngaygio = new DateTime($arr_dv['ngaydang']);
                            $ngay = $ngaygio->format("d/m/Y");
                            $gio = $ngaygio->format("H:i:s");
                            echo "<span class='ngay_dang'>".$ngay."&nbsp; | &nbsp;</span>";
                            echo "<span class='ngay_dang'>".$gio."</span>";
                        ?>
                    </div>
        
                    <div>
                        <?php 
                            echo $arr_dv['noidungthugon'];
                        ?>                
                    </div>
        
                    <div class="noi_dung_day_du_chi_tiet_tin_tuc">
                        <?php 
                            echo $arr_dv['noidungdaydu'];
                        ?>               
                    </div>
               

                <?php

			endif;

		}

		else if ($MaLoaiTrang == 6)

		{

			if(isset($_REQUEST['id'])):

				$id = $_REQUEST['id'];

				$dv = new xl_tintuc();

				$arr_tt = $dv->Load_KienThucTheoMa($id);

				?>

               <div class="tieu_de_chi_tiet_tin_tuc">
                    <?php echo $arr_tt['tieude']; ?>
              </div>
            <div style="margin-top:-10px">
            	<?php 
					$ngaygio = new DateTime($arr_tt['ngaydang']);
					$ngay = $ngaygio->format("d/m/Y");
					$gio = $ngaygio->format("H:i:s");
					echo "<span class='ngay_dang'>".$ngay."&nbsp; | &nbsp;</span>";
					echo "<span class='ngay_dang'>".$gio."</span>";
				?>
            </div>

            <div>
		   		<?php 
					echo $arr_tt['noidungthugon'];
				?>                
			</div>

            <div class="noi_dung_day_du_chi_tiet_tin_tuc">
		   		<?php 
					echo $arr_tt['noidungdaydu'];
				?>               
			</div>

                <?php

			endif;

		}
		
		else if ($MaLoaiTrang == 16)

		{
			include_once("../../coms/xl_sanpham.php");
			if(isset($_REQUEST['id'])):

				$id = $_REQUEST['id'];

				$dv = new xl_sanpham();

				$arr_tt = $dv->Load_SanPhamTheoMa($id);

				?>

               <div class="tieu_de_chi_tiet_tin_tuc">
                    <?php echo $arr_tt['tieude']; ?>
              </div>
            <div style="margin-top:-10px">
            	<?php 
					$ngaygio = new DateTime($arr_tt['ngaydang']);
					$ngay = $ngaygio->format("d/m/Y");
					$gio = $ngaygio->format("H:i:s");
					echo "<span class='ngay_dang'>".$ngay."&nbsp; | &nbsp;</span>";
					echo "<span class='ngay_dang'>".$gio."</span>";
				?>
            </div>

            <div>
		   		<?php 
					echo $arr_tt['noidungthugon'];
				?>                
			</div>

            <div class="noi_dung_day_du_chi_tiet_tin_tuc">
		   		<?php 
					echo $arr_tt['noidungdaydu'];
				?>               
			</div>

                <?php

			endif;

		}

		else

		{

			$lt = new xl_loaitrang();

			$arr_lt = $lt->LayLoaiTrangTheoMa($MaLoaiTrang);

			echo $arr_lt['noidung'];

		}	

		

	endif;

	

?>



    <div style="display:block; text-align:center">

        <div style="padding-top:10px; padding-bottom:10px; padding-left:10px" >

        <?php

            //Neu loai trang la dich vu

			if($MaLoaiTrang == 5):

				echo '<a href="trangchu.php?key=upd&malt='.$MaLoaiTrang.'&madm='.$madm.'&id='.$id.'" class="button medium blue">Sửa nội dung</a>';

            elseif($MaLoaiTrang == 7 || $MaLoaiTrang == 6):

                echo '<a href="trangchu.php?key=upd&malt='.$MaLoaiTrang.'&id='.$id.'" class="button medium blue">Sửa nội dung</a>';
			elseif($MaLoaiTrang == 16):

                echo '<a href="trangchu.php?key=upd_sp&malt='.$MaLoaiTrang.'&id='.$id.'" class="button medium blue">Sửa nội dung</a>';

            else:

                echo '<a href="trangchu.php?key=upd&malt='.$MaLoaiTrang.'" class="button medium blue">Sửa nội dung</a>';

            endif;

            

        ?>

            

             <!--<input type="button" name="btn_CapNhat" value="Sửa nội dung" class="button medium blue">--> <br>

            

        </div>

    </div>



</div>

